{{ define "main" }}

{{ partial "page-title.html" . }}

{{ "<!-- blog details -->" | safeHTML }}
<section class="section">
  <div class="container">
    <div class="row">
      <div class="col-lg-8">
        {{ "<!-- post thumb -->" | safeHTML }}
        <div class="position-relative mb-5">
          <img src="{{ .Params.Image_webp | relURL }}"  onerror="this.src='{{.Params.Image | relURL }}'" alt="post thumb" class="img-fluid w-100">
          {{ with .Params.Categories }}{{range first 1 .}} <div class="card-type">{{ . | title }}</div>{{ end }}{{ end }}
        </div>
        <div class="card-meta text-uppercase mb-2">{{ i18n "author" }}  <strong class="text-dark">{{ .Params.Author | markdownify }}</strong> {{ i18n "published_at" }} <strong class="text-dark">{{ default (i18n "dateFormat") .Site.Params.dateformat | .PublishDate.Format }}</strong></div>
        <div class="content">
          {{ .Content }}
        </div>
        {{ "<!-- tags -->" | safeHTML }}
        <div class="mb-3">
          <h5 class="d-inline-block mr-3">Tags:</h5>
          <ul class="list-inline d-inline-block">
            {{ range $index, $elements:= .Params.Tags }}<a>
            <li class="list-inline-item"><a class="text-color" href="{{ `tags/` | relLangURL }}{{ . | urlize | lower }}"> {{ if ne $index 0 }}, {{ end }}
            {{ . | title }}</a>
            {{ end}}
          </ul>
        </div>
        <!-- comments -->
        {{ if .Site.DisqusShortname }}
        <div class="mt-5">
          {{ template "_internal/disqus.html" . }}
        </div>
        {{ end }}
      </div>
      {{ partial "sidebar.html" . }}
    </div>
  </div>
</section>
{{ "<!-- /blog details -->" | safeHTML }}

{{ end }}
